﻿namespace CKQDJK {
	using System;
	using SuperORM.Attributes;
	using System.ComponentModel;
	
	
	/// <summary>意见模板</summary>
	[Object("意见模板", "CKQDJK", "意见模板")]
	[Browsable(true)]
	[DisplayName("意见模板")]
	[ReadOnly(false)]
	[Serializable()]
	public class 意见模板 : SuperORM.BusinessObject {
		
		/// <summary>内部变量：BSM</summary>
		private int m_BSM;
		
		/// <summary>标示属性BSM是否为空的字段。</summary>
		private bool m_IsBSMNull = true;
		
		/// <summary>内部变量：员工ID</summary>
		private int m_员工ID;
		
		/// <summary>标示属性员工ID是否为空的字段。</summary>
		private bool m_Is员工IDNull = true;
		
		/// <summary>内部变量：部门ID</summary>
		private int m_部门ID;
		
		/// <summary>标示属性部门ID是否为空的字段。</summary>
		private bool m_Is部门IDNull = true;
		
		/// <summary>内部变量：工作流ID</summary>
		private int m_工作流ID;
		
		/// <summary>标示属性工作流ID是否为空的字段。</summary>
		private bool m_Is工作流IDNull = true;
		
		/// <summary>内部变量：模板名称</summary>
		private string m_模板名称;
		
		/// <summary>标示属性模板名称是否为空的字段。</summary>
		private bool m_Is模板名称Null = true;
		
		/// <summary>内部变量：模板内容</summary>
		private string m_模板内容;
		
		/// <summary>标示属性模板内容是否为空的字段。</summary>
		private bool m_Is模板内容Null = true;
		
		/// <summary>内部变量：备注</summary>
		private string m_备注;
		
		/// <summary>标示属性备注是否为空的字段。</summary>
		private bool m_Is备注Null = true;
		
		public static string TypeID = "CKQDJK.意见模板";
		
		/// <summary>属性BSM</summary>
		[Member("BSM", "BSM", true, false, "BSM")]
		[Browsable(true)]
		[DisplayName("BSM")]
		[ReadOnly(false)]
		public int BSM {
			get {
				return this.m_BSM;
			}
			set {
				this.m_BSM = value;
				this.m_IsBSMNull = false;
				if ((this.OnOIDChanged != null)) {
					this.OnOIDChanged(this, null);
				}
			}
		}
		
		/// <summary>属性员工ID</summary>
		[Member("员工ID", "员工ID", "System.Int32", 4, false, false, "员工ID")]
		[Browsable(true)]
		[DisplayName("员工ID")]
		[ReadOnly(false)]
		public int 员工ID {
			get {
				return this.m_员工ID;
			}
			set {
				this.m_员工ID = value;
				this.m_Is员工IDNull = false;
			}
		}
		
		/// <summary>属性部门ID</summary>
		[Member("部门ID", "部门ID", "System.Int32", 4, false, false, "部门ID")]
		[Browsable(true)]
		[DisplayName("部门ID")]
		[ReadOnly(false)]
		public int 部门ID {
			get {
				return this.m_部门ID;
			}
			set {
				this.m_部门ID = value;
				this.m_Is部门IDNull = false;
			}
		}
		
		/// <summary>属性工作流ID</summary>
		[Member("工作流ID", "工作流ID", "System.Int32", 4, false, false, "工作流ID")]
		[Browsable(true)]
		[DisplayName("工作流ID")]
		[ReadOnly(false)]
		public int 工作流ID {
			get {
				return this.m_工作流ID;
			}
			set {
				this.m_工作流ID = value;
				this.m_Is工作流IDNull = false;
			}
		}
		
		/// <summary>属性模板名称</summary>
		[Member("模板名称", "模板名称", "System.String", 100, false, false, "模板名称")]
		[Browsable(true)]
		[DisplayName("模板名称")]
		[ReadOnly(false)]
		public string 模板名称 {
			get {
				return this.m_模板名称;
			}
			set {
				this.m_模板名称 = value;
				this.m_Is模板名称Null = false;
			}
		}
		
		/// <summary>属性模板内容</summary>
		[Member("模板内容", "模板内容", "System.String", 1000, false, false, "模板内容")]
		[Browsable(true)]
		[DisplayName("模板内容")]
		[ReadOnly(false)]
		public string 模板内容 {
			get {
				return this.m_模板内容;
			}
			set {
				this.m_模板内容 = value;
				this.m_Is模板内容Null = false;
			}
		}
		
		/// <summary>属性备注</summary>
		[Member("备注", "备注", "System.String", 1000, false, false, "备注")]
		[Browsable(true)]
		[DisplayName("备注")]
		[ReadOnly(false)]
		public string 备注 {
			get {
				return this.m_备注;
			}
			set {
				this.m_备注 = value;
				this.m_Is备注Null = false;
			}
		}
		
		/// <summary>对象ID发生变化的时候触发的事件</summary>
		public event SuperORM.Attributes.OIDChangedHandler OnOIDChanged;
		
		/// <summary>属性改变的时候</summary>
		public event SuperORM.PropertyChangeHandler PropertyChanged;
		
		// 重载的方法，判断两个对象是否相等，判断条件是两个对象的主键值是否相等。
		public override bool Equals(object obj) {
			意见模板 意见模板 = ((意见模板)(obj));
			if ((意见模板.BSM == this.m_BSM)) {
				return true;
			}
			else {
				return false;
			}
		}
		
		/// <summary>判断某一个属性是否为空</summary>
		public override bool IsNull(string propname) {
			if (propname.Equals("BSM")) {
				return this.m_IsBSMNull;
			}
			if (propname.Equals("员工ID")) {
				return this.m_Is员工IDNull;
			}
			if (propname.Equals("部门ID")) {
				return this.m_Is部门IDNull;
			}
			if (propname.Equals("工作流ID")) {
				return this.m_Is工作流IDNull;
			}
			if (propname.Equals("模板名称")) {
				return this.m_Is模板名称Null;
			}
			if (propname.Equals("模板内容")) {
				return this.m_Is模板内容Null;
			}
			if (propname.Equals("备注")) {
				return this.m_Is备注Null;
			}
			return true;
		}
		
		/// <summary>将某个属性设置为空</summary>
		public override void SetNull(string propname) {
			if (propname.Equals("BSM")) {
				this.m_IsBSMNull = true;
				return;
			}
			if (propname.Equals("员工ID")) {
				this.m_Is员工IDNull = true;
				return;
			}
			if (propname.Equals("部门ID")) {
				this.m_Is部门IDNull = true;
				return;
			}
			if (propname.Equals("工作流ID")) {
				this.m_Is工作流IDNull = true;
				return;
			}
			if (propname.Equals("模板名称")) {
				this.m_Is模板名称Null = true;
				return;
			}
			if (propname.Equals("模板内容")) {
				this.m_Is模板内容Null = true;
				return;
			}
			if (propname.Equals("备注")) {
				this.m_Is备注Null = true;
				return;
			}
		}
	}
}
